//
// Created by heqian on 17-8-11.
//

#ifndef AUTOMAHJONG_BOARDINFO_H
#define AUTOMAHJONG_BOARDINFO_H

#include <vector>
#include "Define.h"
#include "../utils/Prt.h"

using namespace std;
using namespace utils;

namespace mahjong {
    class UserBoard {
    public:
        UserBoard();

        Prt<vector<MahjongEnum>> &getBoard();

        Prt<vector<MahjongEnum>> &getOut();

        Prt<vector<MahjongEnum>> &getOpen();

        MahjongEnum getLackBoard() const;

        void setLackBoard(MahjongEnum mLackBoard);

        bool isDealer() const;

        void setIsDealer(bool mIsDealer);

        void clear();

    private:
        Prt<vector<MahjongEnum>> mBoard;    //自己有的
        Prt<vector<MahjongEnum>> mOut;      //打出的
        Prt<vector<MahjongEnum>> mOpen;     //公开的
        MahjongEnum mLackBoard;
        bool mIsDealer;
    };

    class BoardInfo {
    public:
        BoardInfo();

        Prt<UserBoard> &getMe();

        Prt<UserBoard> &getUp();

        Prt<UserBoard> &getDown();

        Prt<UserBoard> &getTop();

    private:
        Prt<UserBoard> mMe;
        Prt<UserBoard> mUp;
        Prt<UserBoard> mDown;
        Prt<UserBoard> mTop;

        void clear();
    };

}

#endif //AUTOMAHJONG_BOARDINFO_H
